package com.digitalchina.lxnsy.activity.old;

import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.base.BaseActivity;
import com.digitalchina.lxnsy.constant.URL;
import com.digitalchina.lxnsy.xml.UserXML;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.activity
 * 创建人：郑皓
 * 创建时间：2017/6/17 15:10
 * 修改备注：
 * ================================================
 */
public class FarmMoneyRuleActivity extends BaseActivity {

    @Bind(R.id.activity_farm_money_rule_wv)
    WebView activityFarmMoneyRuleWv;

    private String url = "";

    @Override
    public void setLayout() {
        setContentLayout(R.layout.activity_farm_money_rule);
        setTitle("农币规则");
    }

    @Override
    public void initMember() {

        url = URL.URL_QUERY_RULE_DESC_URL+"?userType="+ UserXML.getUserType(this);
        //启用支持javascript
        WebSettings settings = activityFarmMoneyRuleWv.getSettings();
        settings.setJavaScriptEnabled(true);
        //优先使用缓存:
//        settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
        activityFarmMoneyRuleWv.loadUrl(url);

    }

    @Override
    public void addListener() {

    }

    @Override
    public void setHandler() {

    }

    @Override
    public void callBack(Object object) {

    }

    @Override
    public void rightOnClick() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
